#include <d3dx9.h>
#include <string>

using namespace std;

class TwGenerateImage
{
public:
	TwGenerateImage();
	~TwGenerateImage();

	void* GenerateNewImage(BYTE* pkSrc,DWORD dwType,int nWidth, int nHeight);

	void  generatePerlinNoise(float scale, int octaves, float falloff);

	void  SaveToFile(const char* pkFile);
 
	void  ChangeHeightMap(float fFactor,int nCenterX,int nCenterY,int nScale);

	void* GetTextureData() {return m_pkTexture;}

	void  SmoothTerrainSection(int nCenterX,int nCenterY, int nScale,int nDependence);

	const string  GetFilePath() {return m_filePath;};

	void  SetFilePath(const string& path) {m_filePath = path;}

private:
	LPDIRECT3DTEXTURE9   m_pkTexture;
	D3DSURFACE_DESC		 m_surfacedesc;
	int					 m_width;
	int					 m_height;
	string				 m_filePath;
};